package com.vdong.data.service.impl;

import com.vdong.data.model.RestfulInterface;
import com.vdong.data.repository.RestfulInterfaceRepository;
import com.vdong.data.service.RestfulInterfaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RestfulInterfaceServiceImpl implements RestfulInterfaceService {
    @Autowired
    private RestfulInterfaceRepository restfulInterfaceRepository;

    @Override
    @Cacheable(value = "restfulInterface")
    public List<RestfulInterface> findAll() {
        return restfulInterfaceRepository.findAll();

    }
}
